<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="LaboratoryFinancial.aspx.cs" Inherits="LaboratoryFinancial" Title="Financial" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register Namespace="NS_Controls" TagPrefix="cc1" %>
<%@ Register Namespace="CustomControlsNS" TagPrefix="cc2" %>
<asp:Content ID="ContentDefault" ContentPlaceHolderID="ContentPlaceHolderContent"
    runat="Server">
    <link href="../../Styles/themes/fancy/tabs.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/themes/fancy/fancy-blue/fancy-blue.css" rel="stylesheet"
        type="text/css" />
    <link type="text/css" href="../../Styles/ListView/round.css" rel="stylesheet" />
    <link type="text/css" href="../../Styles/ListView/grid.css" rel="stylesheet" />
    <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div style="padding-bottom: 20px">
                <asp:Literal ID="output" runat="server" />
                <ajaxToolKit:TabContainer ID="tabContainer" runat="server" CssClass="fancy fancy-blue"
                    AutoPostBack="true" OnActiveTabChanged="tabActiveTabChanged">
                    <ajaxToolKit:TabPanel ID="tabCostCategory" runat="server" HeaderText="Categorii de Costuri">
                        <ContentTemplate>
                            <div id="ButoaneTipuriCosturi">
                                <cc2:CustomButton ID="btnAddCostCategory" runat="server" Text="Adauga Categorie Noua"
                                    Title="Insert" OnServerClick="btnAddCostCategory_Click" AccessKey="1" />
                            </div>
                            <table width="98%" id="ListaTipuriCosturi">
                                <tr valign="top">
                                    <td>
                                        <br />
                                        <div class="menu_th">
                                            <asp:Label ID="lblTipuriCosturiTH" runat="server" CssClass="menu_th">
												Categorii de costuri
                                            </asp:Label>
                                        </div>
                                        <table width="100%">
                                            <tr>
                                                <td>
                                                    <table border="0" id="CostCategoriesTHead" cellpadding="0" cellspacing="0" width="98%">
                                                        <tr>
                                                            <td>
                                                                <table id="frozenHeadersCostCategories" border="0" width="100%">
                                                                    <tr class="tdh">
                                                                        <td style="width: 6%">
                                                                            &nbsp;
                                                                            <asp:Literal ID="thCostCategoryEditText" runat="server" Text="<%$ Resources:GridView, Edit %>" />
                                                                            &nbsp;
                                                                        </td>
                                                                        <td style="width: 42%">
                                                                            &nbsp;Nume&nbsp;
                                                                        </td>
                                                                        <td style="width: 20%">
                                                                            &nbsp;UM&nbsp;
                                                                        </td>
                                                                        <td style="width: 32%">
                                                                            &nbsp;Pret/UM&nbsp;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td style="width: 16px">
                                                                <!-- offset for the scrollbar -->
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <div style="overflow: scroll; max-height: 250px; vertical-align: top; width: 98%"
                                                        id="costCategoryScroller">
                                                        <asp:Repeater ID="rptCostCategories" runat="server">
                                                            <HeaderTemplate>
                                                                <table border="0" width="98%" cellpadding="0" cellspacing="2" bgcolor="#e0e0e0">
                                                                    <tbody>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <tr class="tdn">
                                                                    <td style="text-align: center; width: 6%">
                                                                        <asp:LinkButton ID="editCostCategory" runat="server" OnClick="EditCostCategory_Click"
                                                                            CommandArgument='<%# Eval("ID") %>'>
                                                                            <asp:Image ID="imgEditCostCategory" runat="server" ImageUrl="~/Images/Edit.gif" AlternateText="<%$ Resources:GridView, Edit %>"
                                                                                border="0" />
                                                                        </asp:LinkButton>
                                                                    </td>
                                                                    <td style="width: 42%">
                                                                        &nbsp;<%# Eval("Name")%>
                                                                    </td>
                                                                    <td style="width: 20%">
                                                                        &nbsp;<%# Eval("UM")%>
                                                                    </td>
                                                                    <td style="width: 32%">
                                                                        &nbsp;<%# Eval("Price")%>
                                                                        ROL /
                                                                        <%# Eval("Symbol")%>
                                                                    </td>
                                                                </tr>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                </tbody> </table>
                                                            </FooterTemplate>
                                                        </asp:Repeater>
                                                        <asp:PlaceHolder ID="noCostCategoriesYet" runat="server" Visible="false">
                                                            <table width="75%" cellpadding="0" cellspacing="2">
                                                                <tr>
                                                                    <td>
                                                                        <font face="Verdana,Arial,Helvetica" color="#191970" size="-2">Ne pare rau, cautarea
                                                                            dumneavoastra nu are nici un corespondent in baza de date! </font>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <font face="Verdana,Arial,Helvetica" color="#191970" size="-2">&nbsp;</font>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </asp:PlaceHolder>
                                                    </div>
                                                    <!-- scroller -->
                                                </td>
                                            </tr>
                                        </table>
                                        <div class="divEnd">
                                        </div>
                                        <asp:Literal ID="CostCategoriesCount" runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajaxToolKit:TabPanel>
                    <ajaxToolKit:TabPanel ID="tabPayType" runat="server" HeaderText="Tipuri de Plata">
                        <ContentTemplate>
                            <cc1:ExtendedGridView ID="egvPayTypes" runat="server" Style="width: 90%" UseDefaultStyle="false"
                                DataKeyNames="id" AutoGenerateEditButton="true" AutoGenerateDeleteButton="true"
                                AutoSave="true" OnRowEditing="egvPayTypes_RowEditing" OnRowCancelingEdit="egvPayTypes_RowCancelingEdit"
                                OnRowUpdating="egvPayTypes_RowUpdating" OnRowDeleting="egvPayTypes_RowDeleting"
                                OnRowInserting="egvPayTypes_RowInserting" ShowEditLink="true" ShowInsertLink="true"
                                EnableInsert="false" EnableExport="false" EnableExportPDF="false" EmptyDataText="Ne pare rau, cautarea dumneavoastra nu are nici un corespondent in baza de date!" />
                            <div class="divEnd">
                            </div>
                            <asp:Literal ID="PayTypesCount" runat="server" />
                        </ContentTemplate>
                    </ajaxToolKit:TabPanel>
                    <ajaxToolKit:TabPanel ID="tabCostsAndOutflow" runat="server" HeaderText="Costuri si Consumuri">
                        <ContentTemplate>
                            <span>Tipuri Investigatii:</span>
                            <asp:DropDownList ID="drpInvestigation" runat="server" Width="250" AutoPostBack="true"
                                OnSelectedIndexChanged="changeIndex" />
                            <br />
                            <asp:ObjectDataSource ID="odsCustomerList" runat="server" TypeName="CustomerDAO"
                                DataObjectTypeName="iCustomDAO.Customer" SelectMethod="FindAll" UpdateMethod="Update"
                                DeleteMethod="Delete" EnablePaging="false" InsertMethod="Insert" ConflictDetection="OverwriteChanges"
                                OldValuesParameterFormatString="old_{0}" />
                            <div class="grid">
                                <div class="rounded">
                                    <div class="top-outer">
                                        <div class="top-inner">
                                            <div class="top">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="mid-outer">
                                        <div class="mid-inner">
                                            <div class="mid">
                                                <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <asp:ListView ID="lvCustomers" runat="server" DataSourceID="odsCustomerList" DataKeyNames="intCodeID"
                                                            InsertItemPosition="LastItem" OnItemCreated="ListView_ItemCreated" OnItemInserting="lvCustomers_ItemInserting"
                                                            OnItemUpdating="ListView_ItemUpdating" OnItemEditing="ListView_ItemEditing">
                                                            <LayoutTemplate>
                                                                <table class="gridview" cellpadding="0" cellspacing="0">
                                                                    <tr class="header">
                                                                        <th>
                                                                        </th>
                                                                        <th>
                                                                            Investigatia
                                                                        </th>
                                                                        <th>
                                                                            Nume
                                                                        </th>
                                                                        <th>
                                                                            Cantitate
                                                                        </th>
                                                                        <th>
                                                                            Pret/UM
                                                                        </th>
                                                                        <th>
                                                                            Interval
                                                                        </th>
                                                                    </tr>
                                                                    <tr id="itemPlaceholder" runat="server" />
                                                                </table>
                                                            </LayoutTemplate>
                                                            <ItemTemplate>
                                                                <tr class='<%# Container.DataItemIndex % 2 == 0 ? "row" : "altrow" %>'>
                                                                    <td class="command">
                                                                        <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" />
                                                                        <asp:LinkButton ID="btnDelete" runat="server" Text="Delete" CommandName="Delete" />
                                                                    </td>
                                                                    <td>
                                                                        <%# Eval("AnalyseName")%>
                                                                    </td>
                                                                    <td>
                                                                        <%# Eval("Name") ?? "&nbsp;"%>
                                                                    </td>
                                                                    <td>
                                                                        <%# Eval("strQty") ?? "&nbsp;"%>
                                                                    </td>
                                                                    <td>
                                                                        <%# Eval("Price") ?? "&nbsp;"%>
                                                                        <span>/</span><%# Eval("Symbol") ?? "&nbsp;"%>
                                                                    </td>
                                                                    <td>
                                                                        <%# Eval("strSD") ?? "&nbsp;"%>
                                                                    </td>
                                                                </tr>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <tr class='edit-info <%# Container.DataItemIndex == 0 ? "first" : string.Empty %>'>
                                                                    <td class="command">
                                                                        <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" />
                                                                    </td>
                                                                    <td>
                                                                        <%# Eval("AnalyseName")%>
                                                                    </td>
                                                                    <td>
                                                                        <asp:Literal ID="litName" runat="server" Text=' <%# Eval("Name")%>' />
                                                                    </td>
                                                                    <td>
                                                                        <asp:Literal ID="Literal1" runat="server" Text=' <%# Eval("strQty")%>' />
                                                                    </td>
                                                                    <td>
                                                                        <asp:Literal ID="Literal2" runat="server" Text=' <%# Eval("Price")%>' />
                                                                    </td>
                                                                    <td>
                                                                        <asp:Literal ID="Literal3" runat="server" Text=' <%# Eval("strSD")%>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="edit" colspan="6">
                                                                        <div class="details">
                                                                            <div class="header">
                                                                                Edit details for '<%# Eval("intCodeID")%>'</div>
                                                                            <table class="detailview" cellpadding="0" cellspacing="0">
                                                                                <tr>
                                                                                    <th>
                                                                                        Nume
                                                                                    </th>
                                                                                    <td>
                                                                                        <asp:DropDownList ID="drpAnalyse" runat="server" />
                                                                                    </td>
                                                                                    <th>
                                                                                        Cantitate
                                                                                    </th>
                                                                                    <td>
                                                                                        <asp:TextBox ID="txtQty" runat="server" Width="50px" Text='<%# Bind("strQty") %>' />
                                                                                    </td>
                                                                                    <%--<th>
                                                                                        Pret
                                                                                    </th>
                                                                                    <td>
                                                                                        <asp:TextBox ID="txtPrice" runat="server" Width="50px" Text='<%# Bind("Price") %>' />
                                                                                    </td>--%>
                                                                                    <th>
                                                                                        Data Start
                                                                                    </th>
                                                                                    <td>
                                                                                        <asp:TextBox ID="txtDataStart" runat="server" MaxLength="10" Text='<%# Bind("strSD") %>' />
                                                                                        <asp:ImageButton ID="imgDataStart" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png"
                                                                                            BorderWidth="0" Width="16" Height="16" />
                                                                                        <ajaxToolKit:FilteredTextBoxExtender ID="ftbStart" runat="server" TargetControlID="txtDataStart"
                                                                                            ValidChars=" :.-/0123456789" />
                                                                                        <ajaxToolKit:CalendarExtender ID="calDataStart" runat="server" TargetControlID="txtDataStart"
                                                                                            PopupButtonID="imgDataStart" Format="dd/MM/yyyy" CssClass="MyCalendar" />
                                                                                        <ajaxToolKit:CalendarExtender ID="calDataStart2" runat="server" TargetControlID="txtDataStart"
                                                                                            CssClass="MyCalendar" />
                                                                                    </td>
                                                                                    <th>
                                                                                        Data Sfarsit
                                                                                    </th>
                                                                                    <td>
                                                                                        <asp:TextBox ID="txtDataEnd" runat="server" MaxLength="10" Text='<%# Bind("strED") %>' />
                                                                                        <asp:ImageButton ID="imgDataEnd" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png"
                                                                                            BorderWidth="0" Width="16" Height="16" />
                                                                                        <ajaxToolKit:FilteredTextBoxExtender ID="ftbEnd" runat="server" TargetControlID="txtDataEnd"
                                                                                            ValidChars=" :.-/0123456789" />
                                                                                        <ajaxToolKit:CalendarExtender ID="calDataEnd" runat="server" TargetControlID="txtDataEnd"
                                                                                            PopupButtonID="imgDataEnd" Format="dd/MM/yyyy" CssClass="MyCalendar" />
                                                                                        <ajaxToolKit:CalendarExtender ID="calDataEnd2" runat="server" TargetControlID="txtDataEnd"
                                                                                            CssClass="MyCalendar" />
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                            <div class="footer command">
                                                                                <asp:LinkButton ID="btnSave" runat="server" Text="Save" CommandName="Update" />
                                                                                <asp:LinkButton ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" />
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </EditItemTemplate>
                                                            <InsertItemTemplate>
                                                                <tr style="background-color: #F0F8FF">
                                                                    <td style="padding: 2px 2px 2px 2px;">
                                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                                                                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                                                                    </td>
                                                                    <td style="padding: 2px 2px 2px 2px;">
                                                                        Investigatia
                                                                        <asp:DropDownList ID="drpInvestig" runat="server" Width="200px" />
                                                                    </td>
                                                                    <td style="padding: 2px 2px 2px 2px;">
                                                                        Categoria
                                                                        <asp:DropDownList ID="drpCostName" runat="server" Width="200px" />
                                                                    </td>
                                                                    <td style="padding: 2px 2px 2px 2px;">
                                                                        Cantitate
                                                                        <asp:TextBox ID="AgeTextBox" runat="server" Text='<%# Bind("strQty") %>' Width="100px" />
                                                                    </td>
                                                                    <td style="padding: 2px 2px 2px 2px;" colspan="2">
                                                                        &nbsp;<%--Pret/UM
                                                                        <<%--asp:TextBox ID="AddressTextBox" runat="server" Text='<%# Bind("Price") %>' Width="100px" />--%>
                                                                    </td>
                                                                </tr>
                                                                <tr style="background-color: #F0F8FF">
                                                                    <td style="padding: 2px 2px 2px 2px;">
                                                                        &nbsp;
                                                                    </td>
                                                                    <td style="padding: 2px 2px 2px 2px;">
                                                                        Data Start
                                                                        <asp:TextBox ID="txtDataStartIns" runat="server" MaxLength="10" />
                                                                        <asp:ImageButton ID="imgDataStartIns" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png"
                                                                            BorderWidth="0" Width="16" Height="16" />
                                                                        <ajaxToolKit:FilteredTextBoxExtender ID="ftbStartIns" runat="server" TargetControlID="txtDataStartIns"
                                                                            ValidChars=" :.-/0123456789" />
                                                                        <ajaxToolKit:CalendarExtender ID="calDataStartIns" runat="server" TargetControlID="txtDataStartIns"
                                                                            PopupButtonID="imgDataStartIns" Format="dd/MM/yyyy" CssClass="MyCalendar" />
                                                                        <ajaxToolKit:CalendarExtender ID="calDataStart2Ins" runat="server" TargetControlID="txtDataStartIns"
                                                                            CssClass="MyCalendar" />
                                                                    </td>
                                                                    <td style="padding: 2px 2px 2px 2px;" colspan="5">
                                                                        Data Sfarsit
                                                                        <asp:TextBox ID="txtDataEndIns" runat="server" MaxLength="10" />
                                                                        <asp:ImageButton ID="imgDataEndIns" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png"
                                                                            BorderWidth="0" Width="16" Height="16" />
                                                                        <ajaxToolKit:FilteredTextBoxExtender ID="ftbEndIns" runat="server" TargetControlID="txtDataEndIns"
                                                                            ValidChars=" :.-/0123456789" />
                                                                        <ajaxToolKit:CalendarExtender ID="calDataEndIns" runat="server" TargetControlID="txtDataEndIns"
                                                                            PopupButtonID="imgDataEndIns" Format="dd/MM/yyyy" CssClass="MyCalendar" />
                                                                        <ajaxToolKit:CalendarExtender ID="calDataEnd2Ins" runat="server" TargetControlID="txtDataEndIns"
                                                                            CssClass="MyCalendar" />
                                                                    </td>
                                                                </tr>
                                                            </InsertItemTemplate>
                                                        </asp:ListView>
                                                        <div class="blockheader" style="padding: 10px; text-align: right;">
                                                            <div style="padding: 10px; text-align: left;">
                                                                <asp:Button ID="btnSave" runat="server" Text="SaveAll" OnClick="SaveAll_Click" /></div>
                                                            <asp:DataPager ID="Pager" runat="server" PagedControlID="lvCustomers" PageSize="10">
                                                                <Fields>
                                                                    <asp:NumericPagerField ButtonCount="10" NextPageText="..." PreviousPageText="..." />
                                                                    <asp:NextPreviousPagerField FirstPageText="First" LastPageText="Last" NextPageText="Next"
                                                                        PreviousPageText="Previous" />
                                                                </Fields>
                                                            </asp:DataPager>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="bottom-outer">
                                        <div class="bottom-inner">
                                            <div class="bottom">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </ContentTemplate>
                    </ajaxToolKit:TabPanel>
                    <ajaxToolKit:TabPanel ID="tabInvestigationPrice" runat="server" HeaderText="Preturi Investigatii">
                        <ContentTemplate>
                            <span>Adaug preturi pentru:</span>
                            <asp:DropDownList ID="drpPaymanetType" runat="server" Width="250" AutoPostBack="true"
                                OnSelectedIndexChanged="changeIndexPayment" />
                            <cc2:CustomButton ID="btnSavePrice" runat="server" Text="Salveaza datele"
                                    Title="Save" OnServerClick="btnSavePrice_Click" AccessKey="1" />
                            <asp:Panel ID="contracte" runat="server">
                                <cc1:ExtendedGridView runat="server" ID="grPayment" UseDefaultStyle="true"
                                    ShowEditLink="true" ShowInsertLink="false" showDeleteButton="false" AutoSave="true"
                                    AllowSorting="true" EnableInsert="false" AllowPaging="true" PageSize="20" AutoGenerateColumns="true"
                                    DataKeyNames="intCodeID" EnableFilter="true" EnablePageSize="true" EnableExport="false"
                                    Width="98%" OnRowDataBound="GridView_RowDataBound">
                                </cc1:ExtendedGridView>
                            </asp:Panel>
                        </ContentTemplate>
                    </ajaxToolKit:TabPanel>
                </ajaxToolKit:TabContainer>
                <div id="divLinkHome" style="padding: 10px">
                    <asp:Image runat="Server" ID="imgReturnMain" ImageUrl="~/Images/Hipocrate/icon_home.gif"
                        AlternateText="Click to return" UseSubmitBehavior="false" Style="cursor: pointer" />
                    <asp:HyperLink ID="lnkMainPage" runat="server" Text="Inapoi la pagina principala"
                        NavigateUrl="~/Default.aspx" />
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div style="left: 20%; right: 20%; float: none; position: absolute; top: 40%; bottom: 40%;
        visibility: visible; background-color: Transparent">
        <asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
        <ajaxToolKit:ModalPopupExtender ID="mdlPopupCostCategories" runat="server" TargetControlID="btnShowPopup"
            PopupControlID="pnlCostCategoryPopup" CancelControlID="CostCategoryCancelButton"
            BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnDragHandleSelectionCostCategory"
            RepositionMode="None" X="0" Y="0" />
        <div id="pnlCostCategoryPopup" runat="server" class="modalPopup" style="display: none"
            width="600px">
            <asp:Table runat="server" ID="tblCostCategoryTitleBar" Style="background-color: #87cefa;
                border: solid 1px Gray; height: 28px; width: 600px">
                <asp:TableRow>
                    <asp:TableCell Width="100%" HorizontalAlign="Center">
                        <asp:Panel runat="server" ID="pnDragHandleSelectionCostCategory" Style="cursor: move;">
                            Editare Tip Costuri
                        </asp:Panel>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:Image ID="CostCategoryCancelButton" AccessKey="c" runat="server" ImageUrl="~/Images/Hipocrate/icon_post_delete.gif"
                            Style="cursor: pointer" title="<%$ Resources:DatabaseStrings, Close %>" />
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            <asp:UpdatePanel ID="upCostCategoryEditor" runat="server" UpdateMode="Always">
                <ContentTemplate>
                    <div id="divCostCategoryTitle" runat="server" style="position: relative; top: -28px;
                        left: 120px">
                        <asp:Table ID="Table1" runat="server" Style="background-color: #87cefa; border: solid 1px Silver;
                            border-left-style: none; border-right-style: none; height: 28px">
                            <asp:TableRow>
                                <asp:TableCell Width="100%" HorizontalAlign="Center">
                                    &nbsp;&nbsp;&nbsp;
                                    <asp:Label ID="lblCostCategoryTitle" runat="server" Font-Bold="true" ForeColor="White">
									Categorie de Costuri <!-- info -->
                                    </asp:Label>
                                    &nbsp;&nbsp;&nbsp;
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </div>
                    <table style="width: 600px">
                        <tr valign="top">
                            <td>
                                <div class="menu_th">
                                    <asp:Label ID="lblCostCategoryH2" runat="server" CssClass="menu_th">
									Categoria <!-- info -->
                                    </asp:Label>
                                </div>
                                <asp:Literal ID="hiddenCostCategoryId" runat="server" Visible="false" />
                                <table width="100%">
                                    <tr class="tdn">
                                        <td style="width: 20%">
                                            Nume:
                                        </td>
                                        <td>
                                            <!-- size="31" -->
                                            <asp:TextBox ID="strCategoryName" runat="server" CssClass="box" MaxLength="50" Style="width: 200px" />
                                        </td>
                                        <td width="20%">
                                            Tip de plata:
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="strPaymentTypeID" runat="server" CssClass="box" />
                                        </td>
                                    </tr>
                                    <tr class="tdn">
                                        <td width="20%">
                                            Unitatea de masura:
                                        </td>
                                        <td style="width: 30%">
                                            <asp:DropDownList ID="strUnitID" runat="server" CssClass="box" />
                                        </td>
                                        <td style="width: 20%">
                                            Pret/UM:
                                        </td>
                                        <td style="width: 30%">
                                            <asp:TextBox ID="strPrice" runat="server" CssClass="box" MaxLength="10" Style="width: 200px" />
                                        </td>
                                    </tr>
                                </table>
                                <div class="divEndTotal">
                                </div>
                                <div style="text-align: center">
                                    <cc2:CustomButton ID="btnSaveCostCategory" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Save %>"
                                        OnServerClick="ProcessCostCategoryCommand" />
                                    &nbsp;&nbsp;
                                    <cc2:CustomButton ID="btnDeleteCostCategory" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Delete %>"
                                        OnServerClick="ProcessCostCategoryCommand" />
                                    &nbsp;&nbsp;
                                    <cc2:CustomButton ID="btnInsertCostCategory" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Add %>"
                                        OnServerClick="ResetCostCategoryId" />
                                    &nbsp;&nbsp;
                                    <cc2:CustomButton ID="btnSearchCostCategory" runat="server" Text="<%$ Resources:DatabaseStrings, CloseWindow %>"
                                        OnServerClick="BackToCostCategoryList" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <!-- pnlCostCategoryPopup -->
    </div>
    <!-- positioning div -->
    <div style="left: 20%; right: 20%; float: none; position: absolute; top: 40%; bottom: 40%;
        visibility: visible; background-color: Transparent">
        <asp:Button ID="btnShowConfirmationRequest" runat="server" Style="display: none" />
        <ajaxToolKit:ModalPopupExtender ID="mdlPopupConfirmationRequest" runat="server" TargetControlID="btnShowConfirmationRequest"
            PopupControlID="pnlConfirmationRequestPopup" BackgroundCssClass="modalBackground"
            PopupDragHandleControlID="pnDragHandleSelectionConfirmationRequest" RepositionMode="None"
            X="0" Y="0" />
        <div id="pnlConfirmationRequestPopup" runat="server" class="modalPopup" style="display: none"
            width="500px">
            <table style="background-color: #87cefa; border: solid 1px Gray; height: 28px; width: 500px">
                <tr>
                    <td style="text-align: center">
                        <asp:Panel runat="server" ID="pnDragHandleSelectionConfirmationRequest" Style="cursor: move;">
                            <asp:Literal ID="dummyWorkaround" runat="server" Text="<%$ Resources:GridView, MultiEdit_Confirmation%>" />
                        </asp:Panel>
                    </td>
                    <td style="text-align: right">
                        <asp:ImageButton ID="btnCloseConfirmationRequest" AccessKey="c" runat="server" ImageUrl="~/Images/Hipocrate/icon_post_delete.gif"
                            Style="cursor: pointer" OnClick="ProcessPayTypeConfirmationAction" title="<%$ Resources:DatabaseStrings, Close %>" />
                    </td>
                </tr>
            </table>
            <asp:UpdatePanel ID="upConfirmationRequest" runat="server" UpdateMode="Always">
                <ContentTemplate>
                    <table style="width: 500px">
                        <tr valign="top">
                            <td>
                                <div style="text-align: center">
                                    <cc2:CustomButton ID="btnSaveAll" runat="server" Text="<%$ Resources:GridView, Confirmation_SaveAll %>"
                                        OnServerClick="ProcessPayTypeConfirmationAction" />
                                    &nbsp;&nbsp;
                                    <cc2:CustomButton ID="btnDiscardAll" runat="server" Text="<%$ Resources:GridView, Confirmation_DiscardAll %>"
                                        OnServerClick="ProcessPayTypeConfirmationAction" />
                                    &nbsp;&nbsp;
                                    <cc2:CustomButton ID="btnBackToEditing" runat="server" Text="<%$ Resources:GridView, Confirmation_Postpone %>"
                                        OnServerClick="ProcessPayTypeConfirmationAction" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <!-- pnlConfirmationRequestPopup -->
    </div>
    <!-- positioning div -->
    <script language="javascript" type="text/javascript">
        function scrollListTo(list, div) {
            var location = Sys.UI.DomElement.getLocation($get(div));
            $get(list).scrollTop = location.y - 300;
        }
    </script>
</asp:Content>
